package com.bp.system.mapper;

import com.bp.system.domain.SysNoticeReadStatus;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author shaominjie
 * @Description 通知公告的读取状态（ps:<p>所有的删除都是假删除</p>）
 * @date %{DATE} 15:57
 */
public interface SysNoticeReadStatusMapper {

    public int insert(SysNoticeReadStatus readStatus);

    public int insertAll(List<SysNoticeReadStatus> list);

    public int update(@Param("id") Long id, @Param("status") String status, @Param("updateBy")String updateBy, @Param("updateTime")Date updateTime);

    public int updateByUserId(@Param("userId") Long userId, @Param("status") String status, @Param("updateBy")String updateBy, @Param("updateTime")Date updateTime);

    public int updateAll(@Param("ids") Long[] deleteByNoticeId,@Param("status") String status);

    public int deleteByNoticeId(@Param("noticeId") Long noticeId);

    public int deleteByUserId(@Param("userId") Long userId);

    public int deleteByUserIds(@Param("userIds") Long[] userId);

    public int deleteByDeptId(@Param("deptId") Long deptId);

    public int deleteByDeptIds(@Param("deptIds") Long[] deptIds);

    public int delete(@Param("id") Long id);

    public List<SysNoticeReadStatus> selectByUserId(@Param("userId") Long userId, @Param("status") String status);

    public List<SysNoticeReadStatus> selectByNoticeId(@Param("noticeId") Long noticeId, @Param("status") String status);

    public int  deleteByNoticeIds(@Param("noticeIds")Long[] toLongArray);

    public  int updateByNoticeIdAndUserId(@Param("noticeId")Long noticeId, @Param("userId")Long userId,  @Param("status")String status, @Param("updateBy")String updateBy, @Param("updateTime")Date updateTime);
}
